abde4bd08f8bf901dba878fc99c8f22c8ca1b071,sonar-runner-api/src/test/java/org/sonar/runner/impl/ServerConnectionTest.java,ServerConnectionTest,should_not_cache_not_preview,#,131
Before Change
public void should_not_cache_not_preview() throws Exception {
File cacheDir = new File(temp.getRoot(), "ws_cache");
httpServer.setMockResponseData("abcde");
Properties props = new Properties();
props.setProperty("sonar.host.url", httpServer.url() + "/");
assertThat(cacheDir.list().length).isEqualTo(0);
ServerConnection connection = ServerConnection.create(props, cache, mock(Logger.class));
String str = connection.downloadStringCache("/batch/index.txt");
assertThat(str).isEqualTo("abcde");
After Change
@Test
public void should_not_cache_not_issues_mode() throws Exception {
File cacheDir = new File(temp.getRoot(), "ws_cache");
ServerConnection connection = createSimpleServerConnection(httpServer.url() + "/", null);
assertThat(cacheDir.list().length).isEqualTo(0);
String str = connection.downloadStringCache("/batch/index.txt");